package org.thinkinbunny.financial.billentity;

import java.io.Serializable;

public class BillEntiry implements Serializable {
	/**
	 * @author yfxiawei
	 * @since 2012
	 * */
	/**
	 * String sql="CREATE TABLE ACCOUNTINFO (_id INTEGER PRIMARY KEY, " +
	 * "name varchar(20), " + "type INTEGER DEFAULT 0, " +
	 * "balance decimal(10,2) DEFAULT 0," + "billType varchar(20), " +
	 * "accountname varchar(20), " + "name text, " + "project text, " +
	 * " hasbalance INTEGER DEFAULT 0," + " moneytype INTEGER DEFAULT 1, " +
	 * "star INTEGER DEFAULT 0," + "time time);";
	 * 
	 * */

	private int _id;
	private float balance;
	private String billType;
	private String accountname;
	private String project;
	private String store;
	private String date;
	private String time;

	public BillEntiry(int _id, float balance, String billType,
			String accountname, String project, String store, String date,
			String time) {
		super();
		this._id = _id;
		this.balance = balance;
		this.billType = billType;
		this.accountname = accountname;
		this.project = project;
		this.store = store;
		this.time = time;
		this.date = date;
	}

	public static BillEntiry createBillEntiry(float balance, String billType,
			String accountname, String project, String store, String date,
			String time) {
		BillEntiry billEntiry = new BillEntiry();
		billEntiry.balance = balance;
		billEntiry.billType = billType;
		billEntiry.accountname = accountname;
		billEntiry.project = project;
		billEntiry.store = store;
		billEntiry.time = time;
		billEntiry.date = date;
		return billEntiry;
	}

	public BillEntiry() {
		this._id =0;
		this.balance = 0;
		this.billType = "";
		this.accountname = "";
		this.project = "";
		this.store = "";
		this.time = "";
		this.date = "";
	//	super();

	}

	public double getBalance() {
		return balance;
	}

	public void setBalance(float balance) {
		this.balance = balance;
	}

	public String getBillType() {
		return billType;
	}

	public void setBillType(String billType) {
		this.billType = billType;
	}

	public String getAccountname() {
		return accountname;
	}

	public void setAccountname(String accountname) {
		this.accountname = accountname;
	}

	public String getProject() {
		return project;
	}

	public void setProject(String project) {
		this.project = project;
	}

	public String getStore() {
		return store;
	}

	public void setStore(String store) {
		this.store = store;
	}

	public String getTime() {
		return time;
	}

	public void setTime(String time) {
		this.time = time;
	}

	public String getDate() {
		return date;
	}

	public void setDate(String date) {
		this.date = date;
	}

	public int get_id() {
		return _id;
	}

	public void set_id(int _id) {
		this._id = _id;
	}

	@Override
	public String toString() {
		return "BillEntiry [_id=" + _id + ", balance=" + balance
				+ ", billType=" + billType + ", accountname=" + accountname
				+ ", project=" + project + ", store=" + store + ", date="
				+ date + ", time=" + time + "]";
	}
}
